package com.zhonghui.controller;

import com.zhonghui.common.core.result.FwResult;
import com.zhonghui.dto.PageDto;
import com.zhonghui.dto.CreateRechargeDto;
import com.zhonghui.service.RechargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: FL
 * @create: 2024 2024/5/17 10:13
 */
@RestController
public class RechargeController {
    @Autowired
    RechargeService rechargeService;

    /**
     * 查询充值订单
     * @return
     */
    @PostMapping("/recharge")
    public FwResult recharge(@RequestBody PageDto pageDto) {
        return rechargeService.getRecharge(pageDto);
    }

    @PostMapping("/recharge/create")
    public FwResult createRechargeRecord(@RequestBody CreateRechargeDto createRechargeDto) {
        return rechargeService.createRechargeRecord(createRechargeDto);
    }
}
